<template>
  <el-dialog
      title="选择抄送人"
      v-model="visible"
      append-to-body
      destroy-on-close
      width="60%"
  >
    <c-general-copies ref="copiesField" :copiesData="copiesData" :roleCopiesData="roleCopiesData"></c-general-copies>
    <template #footer>
    <span class="dialog-footer">
      <el-button @click="visible = false">取 消</el-button>
      <el-button type="primary" @click="submitCopiesData">确 定</el-button>
    </span>
    </template>
  </el-dialog>
</template>

<script>
import GeneralCopies from "./GeneralCopies";

export default {
  name: "UserCopiesDialog",
  components: {
    "c-general-copies": GeneralCopies,
  },
  props: {
    copiesData: {
      type: Array
    },
    roleCopiesData: {
      type: Array
    },
    submitCopies: {
      type: Function
    },
  },
  data(){
    return {
      visible: false
    }
  },
  methods: {
    submitCopiesData(){
      this.submitCopies();
    }
  }
}
</script>

<style scoped>

</style>